<%@page contentType="text/html" pageEncoding="UTF-8" import="java.io.*, java.sql.*, javax.sql.*"%>
<%
    Connection con = com.elookinto.wordlist.Util.getCon();
    String uid = (String) session.getAttribute("uid");
    if (uid==null) return;
    PreparedStatement st = con.prepareStatement("Select distinct listname  from wordlist where uid=? order by listname");
    st.setString(1,uid);
    out.println("Lists from User: " + uid + "<br/>");
    ResultSet rs = st.executeQuery();
    while (rs.next()) {
         String listName = rs.getString("listname");
        //System.out.println(rs.getDate("insert_time"));
        //System.out.println(rs.getString("listname"));
        //System.out.println(rs.getString("uid"));
        //System.out.println(word);
%>

<a style="margin-left:5px" href="javascript:void(0)" onclick=" wordList('<%= listName %>')"><%= listName %></a>

<%} %>
<br/>
<a style="margin-left:5px" href="javascript:void(0)" onclick=" wordList(1)" > Today's New Words </a>
<a style="margin-left:5px" href="javascript:void(0)" onclick=" wordList(7)" > Past Week's New Words </a>
<a style="margin-left:5px" href="javascript:void(0)" onclick=" wordList(30)" > Past Month's Words </a>
<%
    rs.close();
    st.close();
    con.close();
%>
